Added new apis to workbook and datasource#1637
Added new apis to workbook and datasource#1637vchavatapalli wants to merge 5 commits intotableau:developmentfrom vchavatapalli:master
Conversation
…Interval-bug Tableau API is expecting an integer or 'lastDay'.
|
Thanks for the contribution! Unfortunately we can't verify the commit author(s): Vineeth Chavatapalli <v***@s***.com> SFDC\vchavatapalli <v***@s***.com>. One possible solution is to add that email to your GitHub account. Alternatively you can change your commits to another email and force push the change. After getting your commits associated with your GitHub account, refresh the status of this Pull Request. |
jorwoods
left a comment
There was a problem hiding this comment.
- Unit tests are missing for these endpoints.
- Can you point to the docs where you found these endpoints that support updating multiple connections at a time? I don't see it anywhere.
|
|
||
| @api(version="3.26") | ||
| def update_connections( | ||
| self, datasource_item: DatasourceItem, connection_luids: list[str], authentication_type: str, username: Optional[str] = None, password: Optional[str] = None, embed_password: Optional[bool] = None |
There was a problem hiding this comment.
Should accept an Iterable[ConnectionItem] rather than taking a list of ids and then Connection attributes as keyword args.
|
|
||
| # Update workbook_connections | ||
| @api(version="3.26") | ||
| def update_connections(self, workbook_item: WorkbookItem, connection_luids: list[str], authentication_type: str, username: Optional[str] = None, password: Optional[str] = None, embed_password: Optional[bool] = None |
There was a problem hiding this comment.
Same as datasource method.
|
|
||
| url = f"{self.baseurl}/{datasource_item.id}/connections" | ||
|
|
||
| ts_request = Element("tsRequest") |
There was a problem hiding this comment.
Creating the XML payload belongs in the request_factory.
|
|
||
| def _interval_type_pairs(self): | ||
| return [(IntervalItem.Occurrence.MonthDay, self.interval)] | ||
| return [(IntervalItem.Occurrence.MonthDay, str(day)) for day in self.interval] |
No description provided.